﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UserView.master" AutoEventWireup="true" CodeBehind="AddNewSellOffer.aspx.cs" Inherits="BestBuy.PageUser.AddNewSellOffer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<link href="../Styles/Seller.css" rel="stylesheet" type="text/css" />
    <link href="../Styles/Manager.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<asp:Panel ID="Panel3" runat="server" CssClass="left-side-bar bs-docs-sidebar">
            <ul class="nav nav-list bs-docs-sidenav">
              <li class="active" style="text-align: center;"><a href="#">My Product</a></li>
              <li><a id="A5" runat="server" href="AddNewProduct.aspx">
                <i class="icon-chevron-right"></i>Add New Product</a></li>
              <li><a id="A6" runat="server" href="MbSellling.aspx">
                <i class="icon-chevron-right"></i>Manage Products</a></li>        
            </ul>
        <br />
            <ul class="nav nav-list bs-docs-sidenav">
              <li class="active" style="text-align: center;"><a href="#">My Sell Offers</a></li>
              <li><a id="A8" runat="server" href="AddNewSellOffer.aspx">
                <i class="icon-chevron-right"></i>Add New Sell Offer</a></li>
              <li><a id="A9" runat="server" href="ManageSellOffer.aspx">
                <i class="icon-chevron-right"></i>Manage Sell Offers</a></li>          
            </ul> 
     </asp:Panel>
<div class="main-content">
<asp:ScriptManager ID="ScriptManage1" runat="server">
        </asp:ScriptManager>
 <div class="head">
    Sell Offer Details
    </div>
    <table border="0" cellspacing="3" cellpadding="3" width="100%">
    	<tr>
    		<td class="td">Subject :</td>
            <td><asp:TextBox ID="tbSubject" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="tbSubject" ErrorMessage="Please enter Subject" 
                    SetFocusOnError="True" ForeColor="Red">*</asp:RequiredFieldValidator>
            </td>
    	</tr>       
        <tr> 
    		<td class="td">Keyword :</td>
            <td><asp:TextBox ID="tbKeyWord" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="tbKeyWord" ErrorMessage="Please enter keyword" 
                    ForeColor="Red">*</asp:RequiredFieldValidator>
            </td>
    	</tr>
        <tr>
    		<td class="td">Category :</td>
            <td>
            <a id="lnkPopup" runat="server" style="display: none"></a>
            <asp:Button ID="btSelectCategory" runat="server" CssClass="button1" 
                    Text="Select Category" onclick="lbtnChangeCategory_Click" />    
                    <asp:Button ID="btRemoveSelect" runat="server" Text="Remove Selected" 
                    onclick="btRemoveSelect_Click" CssClass="button1"  />                           
            </td>                
    	</tr>
        <tr>
            <td>
            </td>
            <td>
               <asp:ListBox ID="CategoryListBox" runat="server" height="100px">                   
                </asp:ListBox>
            </td>
        </tr>
        <tr>
    		<td ></td>
            <td>
                <asp:Literal ID="Message" runat="server" Text="Please, select category" Visible="false"></asp:Literal></td>
    	</tr>
        <tr>
    		<td class="td">Detailed Description :</td>
            <td>
                <asp:TextBox ID="tbDescription" runat="server" TextMode="MultiLine" Height="100px" 
                    Width="60%"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="tbDescription" 
                    ErrorMessage="Please enter detail description" ForeColor="Red">*</asp:RequiredFieldValidator>
            </td>
    	</tr>
        <tr>
    		<td class="td">Time of Validity :</td>
            <td><asp:DropDownList ID="DropDownList1" runat="server">
                <asp:ListItem Value="7">1 week</asp:ListItem>
                <asp:ListItem Value="14">2 week</asp:ListItem>
                <asp:ListItem Value="21">3 week</asp:ListItem>
                <asp:ListItem Value="30">1 month</asp:ListItem>
                <asp:ListItem Value="60">2 month</asp:ListItem>
                <asp:ListItem Value="90">3 month</asp:ListItem>
                <asp:ListItem Value="120">4 month</asp:ListItem>
                <asp:ListItem Value="150">5 month</asp:ListItem>
                <asp:ListItem Value="180">6 month</asp:ListItem>
                <asp:ListItem Value="365">1 year</asp:ListItem>
            </asp:DropDownList>    </td>                   
    	</tr>
    </table>

   <div class="head">Photo</div>
   <table border="0" cellspacing="3" cellpadding="3" width="100%">
   	<tr>
   		<td class="td">Attach a Product Photo:</td>
        <td>
            <asp:FileUpload ID="UploadPhoto" runat="server" /></td>
   	</tr>
   </table>
   
   <div class="head">Packaging & Shipment Details
   </div>
   <table border="0" cellspacing="3" cellpadding="3" width="100%" align="right" >
   	<tr>
   		<td class="td">Delivery Time: </td>
        <td><asp:TextBox ID="tbDeliverTime" runat="server"></asp:TextBox></td>
   	</tr>
    <tr>
        <td class="td">Supply Ability: </td>
        <td><asp:TextBox ID="tbSupply" runat="server" Width="40px" ></asp:TextBox>&nbsp;&nbsp;
                <asp:DropDownList ID="DDdonvi1" runat="server" Width="130px"> </asp:DropDownList>
                &nbsp;&nbsp;/&nbsp;&nbsp;
                <asp:DropDownList ID="DDdate" runat="server" Width="70px">
                    <asp:ListItem Value="Day"></asp:ListItem>
                    <asp:ListItem Value="Week"></asp:ListItem>
                    <asp:ListItem Value="Month"></asp:ListItem>
                    <asp:ListItem Value="Year"></asp:ListItem>
            </asp:DropDownList>                        
        </td>                
    </tr>
    <tr>
        <td class="td">Place of Origin:
        </td>
        <td><asp:TextBox ID="tbPlace" runat="server"></asp:TextBox></td>
    </tr>
   </table>

   <div class="head">
    Minimum Order & Payment
   </div>
    <table border="0" cellspacing="3" cellpadding="3" width="100%">
    	<tr>
    		<td class="td">Minimum Order Quantity: </td>
            <td><asp:TextBox ID="tbMiniOrder" runat="server"></asp:TextBox>
                <asp:DropDownList ID="DDDonvi2" runat="server" Width="130px"></asp:DropDownList>                
            </td>
            
    	</tr>
        <tr>
            <td class="td">Payment Type :</td>
            <td>
                <asp:CheckBoxList ID="CheckBoxList1" runat="server" Height="40px" 
                    RepeatColumns="2" Width="200px">
                    <asp:ListItem>T/T</asp:ListItem>
                    <asp:ListItem>L/C</asp:ListItem>
                    <asp:ListItem>Western Union</asp:ListItem>
                    <asp:ListItem>Paypal</asp:ListItem>
                </asp:CheckBoxList>
            </td>                        
        </tr>
        <tr>
            <td class="td">Repost:
            </td>
            <td><asp:CheckBox ID="CheckBox1" runat="server" Enabled="False"/> &nbsp;&nbsp; Re-Post this offer automatically after it expires
(Only paid members can use this feature)</td>
        </tr>               
    </table>
    <div>
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="Red" />
    </div>
    <br />
     <div align="center">
         <asp:Button ID="btSubmit" runat="server" Text="Post it now" 
             CssClass="style_button" onclick="btSubmit_Click" /></div>
         <br />
</div>
<asp:Panel ID="panEdit" runat="server" CssClass="ModalWindow">
                        <h1 class="PopUp_h1">
                            Select Category
                            <asp:Label ID="lbThongBaoAddCategory" runat="server" Visible="false"></asp:Label> 
                        </h1>
                        <div>
                            <asp:Label ID="lbThongBaoLimit" runat="server" Text="Limit quantity to add: "></asp:Label>
                            <asp:Label ID="lbLimitQuantity" runat="server"></asp:Label>
                        </div>
                        <div class="select-category">
                            <asp:GridView ID="gvLevel1" runat="server" AutoGenerateColumns="False" CssClass="gridviewWidth"
                                DataMember="TenDanhMuc" GridLines="None" CellPadding="4" ForeColor="#333333" OnRowDataBound="gvLevel1_OnRowDataBound">
                                <Columns>
                                    <asp:TemplateField  ShowHeader="False">
                                        <ItemTemplate>
                                            <asp:Label ID="lbLevel" runat="server" Text=" >>"></asp:Label>
                                            <asp:CheckBox ID="cbLevel" runat="server" Visible="false"  AutoPostBack="true"
                                            ObjectId='<%# Eval("IDDanhMuc") %>' OnCheckedChanged="cbLevel_CheckedChanged"/>
                                            <asp:LinkButton ID="LinkDanhMuc" runat="server" Text='<%# Eval("TenDanhMuc") %>' 
                                            OnClick="LinkDanhMucLevel1_Click" ObjectId='<%# Eval("IDDanhMuc") %>'>
                                            </asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </div>
                        <div class="select-category">
                            <asp:GridView ID="gvLevel2" runat="server" AutoGenerateColumns="False" CssClass="gridviewWidth"
                                DataMember="TenDanhMuc" GridLines="None" CellPadding="4" ForeColor="#333333" OnRowDataBound="gvLevel2_OnRowDataBound">
                                <Columns>
                                    <asp:TemplateField  ShowHeader="False">
                                        <ItemTemplate>
                                            <asp:Label ID="lbLevel" runat="server" Text=" >>"></asp:Label>
                                            <asp:CheckBox ID="cbLevel" runat="server"  Visible="false"  AutoPostBack="true" 
                                            ObjectId='<%# Eval("IDDanhMuc") %>' OnCheckedChanged="cbLevel_CheckedChanged"/>
                                            <asp:HiddenField ID="hidIDDanhMuc" runat="server" Value='<%# Eval("IDDanhMuc") %>' />
                                            <asp:LinkButton ID="LinkDanhMuc" runat="server" Text='<%# Eval("TenDanhMuc") %>'
                                            OnClick="LinkDanhMucLevel2_Click" ObjectId='<%# Eval("IDDanhMuc") %>'></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </div>
                        <div class="select-category">
                            <asp:GridView ID="gvLevel3" runat="server" AutoGenerateColumns="False" CssClass="gridviewWidth"
                                DataMember="TenDanhMuc" GridLines="None" CellPadding="4" ForeColor="#333333" OnRowDataBound="gvLevel3_OnRowDataBound">
                                <Columns>
                                    <asp:TemplateField  ShowHeader="False">
                                        <ItemTemplate>
                                            <asp:Label ID="lbLevel" runat="server" Text=" >>"></asp:Label>
                                            <asp:CheckBox ID="cbLevel" runat="server"  Visible="false"  AutoPostBack="true"
                                            ObjectId='<%# Eval("IDDanhMuc") %>' OnCheckedChanged="cbLevel_CheckedChanged"/>
                                            <asp:HiddenField ID="hidIDDanhMuc" runat="server" Value='<%# Eval("IDDanhMuc") %>' />
                                            <asp:LinkButton ID="LinkDanhMuc" runat="server" Text='<%# Eval("TenDanhMuc") %>'
                                            OnClick="LinkDanhMucLevel3_Click" ObjectId='<%# Eval("IDDanhMuc") %>'></asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </div>
                        <br />
                        <div style="width:100%; text-align:center;">
                            <asp:Button ID="btnAddCategory" runat="server" Text="Add Category" OnClick="btnAddCategory_OnClick"/>
                            <asp:Button ID="btnCancel" runat="server" Text="Cancel"  OnClick="btnCancel_OnClick"/>
                        </div>
                    </asp:Panel>
                    <ajaxToolkit:ModalPopupExtender ID="mpeDanhMuc" runat="server" TargetControlID="lnkPopup"
                        PopupControlID="panEdit" BackgroundCssClass="modalBackground">
                    </ajaxToolkit:ModalPopupExtender>
</asp:Content>
